﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace RM.BLL
{
    [Serializable]
    public partial class RMRole
    {
        private readonly DAL.RMRole dal;        
        public RMRole()
        {
            dal = new DAL.RMRole();
        }
        /// <summary>
        /// 判断数据是否存在
        /// </summary>
        public bool Exists(int id)
        {
            return dal.Exists(id);
        }
        /// <summary>
        /// 得到角色名称
        /// </summary>
        public string GetRoleName(int id)
        {
            return dal.GetRoleName(id);
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Model.RMRole model)
        {
            return dal.Add(model);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.RMRole model)
        {
            return dal.Update(model);
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.RMRole GetModel(int id)
        {
            return dal.GetModel(id);
        }
        /// <summary>
        /// 得到非泛型集合的ArrayList，得到所有model
        /// </summary>
        public List<Model.RMRole> GetAllModel()
        {
            return dal.GetAllModel();
        }
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string fieldOrder, out int recordCount)
        {
            return dal.GetList(pageSize, pageIndex, strWhere, fieldOrder, out recordCount);
        }
    }
}
